﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucThemAdmin.ascx.cs" Inherits="Admin_ucControl_ucThemAdmin" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<table border="0" cellpadding="0" cellspacing="3" style="margin-left: 100px;" width="100%">
    <tr>
        <td>
        </td>
        <td align="left">
            <asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
        </td>
    </tr>
    <tr>
        <td>
            Email:
        </td>
        <td align="left">
            <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txtEmail"
                WatermarkCssClass="clsWaterMarkRequiredField" WatermarkText="email@user.com">
            </asp:TextBoxWatermarkExtender>
            <asp:TextBox ID="txtEmail" runat="server" ValidationGroup="validRegister" ToolTip="Input email"
                CssClass="txtRegisterReq" Width="250px"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtEmail"
                runat="server" ErrorMessage="*" SetFocusOnError="True" Display="Static" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>&nbsp;
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Invalid email address"
                Display="Static" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                ControlToValidate="txtEmail" SetFocusOnError="True" ValidationGroup="grpRegister"></asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td>
            Mật khẩu:
        </td>
        <td>
            <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" ToolTip="Input password"
                CssClass="txtRegisterReq" Width="250px"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtPassword"
                runat="server" ErrorMessage="*" Display="Static" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            Nhập lại mật khẩu :
        </td>
        <td>
            <asp:TextBox ID="txtRePassword" runat="server" TextMode="Password" ToolTip="Retype your password"
                CssClass="txtRegisterReq" Width="250px"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator ID="requireRePassword" ControlToValidate="txtRePassword"
                runat="server" ErrorMessage="*" Display="Dynamic" ValidationGroup="grpRegister"></asp:RequiredFieldValidator><asp:CompareValidator
                    ID="CompareValidator1" runat="server" ErrorMessage="Passwords do not match. "
                    Display="Dynamic" ControlToCompare="txtPassword" ControlToValidate="txtRePassword"
                    ValidationGroup="grpRegister"></asp:CompareValidator>
        </td>
    </tr>
    <tr>
        <td>
            Họ tên:
        </td>
        <td>
            <asp:TextBox ID="txtFName" runat="server" ValidationGroup="validRegister" Width="250px"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator ID="requireFirstName" ControlToValidate="txtFName"
                runat="server" ErrorMessage="*" Display="Dynamic" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            Số điện thoại :
        </td>
        <td align="left">
            <asp:TextBox ID="txtphone" runat="server" ValidationGroup="validRegister" Width="250px"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="txtphone"
                runat="server" ErrorMessage="*" Display="Dynamic" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            Địa chỉ :
        </td>
        <td align="left">
            <asp:TextBox ID="txtAdress" runat="server" ValidationGroup="validRegister" Width="250px"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator3" ControlToValidate="txtAdress"
                runat="server" ErrorMessage="*" Display="Dynamic" ValidationGroup="grpRegister"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
        </td>
        <td align="left">
            <asp:Button ID="btnSave" runat="server" Text="Lưu" OnClick="btnSave_Click" />
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <asp:GridView ID="grdAdmin" runat="server" CellPadding="3" AutoGenerateColumns="False"
                AllowPaging="True" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
                BorderWidth="1px" ShowFooter="True" Width="550px" OnPageIndexChanging="grdAdmin_PageIndexChanging">
                <RowStyle ForeColor="#000066" />
                <FooterStyle BackColor="White" ForeColor="#000066" />
                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" Height="35px" />
                <Columns>
                    <asp:TemplateField HeaderText="STT">
                        <ControlStyle Height="22px" />
                        <ItemStyle HorizontalAlign="Center" Width="30px" />
                        <ItemTemplate>
                            <asp:Label ID="STT" runat="server" Text="<%# ((grdAdmin.PageIndex * grdAdmin.PageSize) + grdAdmin.Rows.Count + 1)%>"></asp:Label></ItemTemplate>
                    </asp:TemplateField>
                    <asp:HyperLinkField DataTextField="Name" DataNavigateUrlFormatString="~/Admin/DanhSachAmin.aspx?id={0}"
                        HeaderText="Họ Tên" SortExpression="ID" DataNavigateUrlFields="ID">
                        <ItemStyle Width="150px" HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:TemplateField HeaderText="Email đăng nhập">
                        <ControlStyle Height="22px" />
                        <ItemStyle HorizontalAlign="Center" Width="150px" />
                        <ItemTemplate>
                            <%# Server.HtmlDecode(Eval("Email").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Số điện thoại">
                        <ControlStyle Height="22px" />
                        <ItemStyle HorizontalAlign="Center" Width="110px" />
                        <ItemTemplate>
                            <%# Server.HtmlDecode(Eval("MobilePhone").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Delete">
                        <ItemTemplate>
                            <asp:ImageButton ID="btnDelImg" runat="server" CausesValidation="false" CommandArgument='<%# Eval("ID") %>'
                                CommandName="delete" ImageUrl="~/Admin/images/table/del.gif" OnClick="btnDelImg_Click" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
</table>
